#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
    int a1 = 2;
    int d = 3;
    int n = 0;
    int sum = 0;
    while (scanf("%d", &n) != EOF)
    {
        sum = (a1 + (a1 + (n - 1) * d)) * n / 2;
        printf("%d\n", sum);
    }
}